package com.longtop.framework.sys.file.supports;

import java.util.List;

import com.longtop.framework.sys.file.excel.ExcelAnalyser;

public abstract class UpLoadBase {

	/**
	 * 文件命名策略
	 */
	protected BaseFileRename baseNamePolicy;

	/**
	 * 上传编码
	 */
	protected String enCode = "utf-8";

	protected ExcelAnalyser excelAnalyser = null;

	/**
	 * 允许上传文件 值是文件的后缀名 以逗号隔开
	 */
	protected String allowedFiles;
	/**
	 * 过滤上传文件
	 * 
	 * 值是文件的后缀名 以逗号隔开
	 */
	protected String deniedFiles;

	/**
	 * 上传的路劲是否是相对服务器路径
	 */
	protected boolean contextPath = true;

	protected String root;
	/**
	 * 上传路径
	 */
	protected String savaBasePath;
	/**
	 * 下载路径
	 */
	protected String viewBasePath;
	/**
	 * 上传
	 */
	protected BaseMultipartRequest myUpload = null;

	/**
	 * 文件名
	 */
	protected String fileName = "";

	/**
	 * 保存物理名，
	 */
	protected String timeStamp = String.valueOf(System.currentTimeMillis());

	protected String system = System.getProperty("os.name").toLowerCase();

	/**
	 * 
	 */
	@SuppressWarnings("unchecked")
	protected List VName;

	protected boolean datePackage = false;

	/**
	 * 上传的最大文件
	 */
	protected long maxFileSize = 5000;

	protected String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	protected String getTimeStamp() {
		return timeStamp;
	}

	public void setTimeStamp(String timeStamp) {
		this.timeStamp = timeStamp;
	}

	@SuppressWarnings("unchecked")
	protected List getVName() {
		return VName;
	}

	@SuppressWarnings("unchecked")
	public void setVName(List name) {
		VName = name;
	}

	protected long getMaxFileSize() {
		return maxFileSize;
	}

	public void setMaxFileSize(long maxFileSize) {
		this.maxFileSize = maxFileSize;
	}

	protected String getViewBasePath() {
		return viewBasePath;
	}

	public void setViewBasePath(String viewBasePath) {
		this.viewBasePath = viewBasePath;
	}

	protected String getSavaBasePath() {
		return savaBasePath;
	}

	public void setSavaBasePath(String savaBasePath) {
		this.savaBasePath = savaBasePath;
	}

	protected String getAllowedFiles() {
		return allowedFiles;
	}

	public void setAllowedFiles(String allowedFiles) {
		this.allowedFiles = allowedFiles;
	}

	protected String getDeniedFiles() {
		return deniedFiles;
	}

	public void setDeniedFiles(String deniedFiles) {
		this.deniedFiles = deniedFiles;
	}

	public void setEnCode(String enCode) {
		this.enCode = enCode;
	}

	public void setBaseNamePolicy(BaseFileRename baseNamePolicy) {
		this.baseNamePolicy = baseNamePolicy;
	}

	protected BaseMultipartRequest getMyUpload() {
		return myUpload;
	}

	public void setMyUpload(BaseMultipartRequest myUpload) {
		this.myUpload = myUpload;
	}

	public void setContextPath(boolean contextPath) {
		this.contextPath = contextPath;
	}

	public boolean isDatePackage() {
		return datePackage;
	}

	public void setDatePackage(boolean datePackage) {
		this.datePackage = datePackage;
	}

	public ExcelAnalyser getExcelAnalyser() {
		return excelAnalyser;
	}

	public void setExcelAnalyser(ExcelAnalyser excelAnalyser) {
		this.excelAnalyser = excelAnalyser;
	}

	public BaseFileRename getBaseNamePolicy() {
		return baseNamePolicy;
	}

	public String getEnCode() {
		return enCode;
	}

	public boolean isContextPath() {
		return contextPath;
	}

	public String getRoot() {
		return root;
	}

	public void setRoot(String root) {
		this.root = root;
	}

	public String getSystem() {
		return system;
	}

}
